<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>图片浏览器</title>
<!-- js -->
<include file="Common/javascripts" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Min/?f=__PUBLIC__/admin/bootstrap/css/bootstrap.min.css" />
</head>
<script>
function nullLink(){ return; }
function ChangeImage(surl){ document.getElementById('picview').src = surl; }
</script>
<style>
.napisdiv {
  display: none;
  height: 100px;
  left: 40px;
  position: absolute;
  top: 3px;
  width: 150px;
  z-index: 3;
}
</style>
</head>
<body>
<div id="floater" class="napisdiv"> <a href="javascript:nullLink();" onClick="document.getElementById('floater').style.display='none';"><img src='__PUBLIC__/admin/images/img/picviewnone.gif' id='picview' border='0' alt='单击关闭预览' class="img-thumbnail"></a> </div>
<SCRIPT language=JavaScript src="__PUBLIC__/admin/images/img/float.js"></SCRIPT> 
<SCRIPT language=JavaScript>
function nullLink(){ return; }
function ChangeImage(surl){ document.getElementById('floater').style.display='block';document.getElementById('picview').src = surl; }
function TNav()
{
	if(window.navigator.userAgent.indexOf("MSIE")>=1) return 'IE';
  else if(window.navigator.userAgent.indexOf("Firefox")>=1) return 'FF';
  else return "OT";
}
// 获取地址参数
function getUrlParam(paramName)
{
  var reParam = new RegExp('(?:[\?&]|&amp;)' + paramName + '=([^&]+)', 'i') ;
  var match = window.location.search.match(reParam) ;
  return (match && match.length > 1) ? match[1] : '' ;
}

function ReturnImg(reimg)
{
    var funcNum = getUrlParam('CKEditorFuncNum');
	if(funcNum > 1)
	{
		var fileUrl = reimg;
		window.opener.CKEDITOR.tools.callFunction(funcNum, fileUrl);
	}
	if(window.opener.document.{$f} != null)
	{
		window.opener.document.{$f}.value=reimg;
		if(window.opener.document.getElementById('div{$v}'))
	    {
		 if(TNav()=='IE'){
			 //window.opener.document.getElementById('div{$v}').filters.item('DXImageTransform.Microsoft.AlphaImageLoader').src = reimg;
			 window.opener.document.getElementById('div{$v}').src = reimg;
			 window.opener.document.getElementById('div{$v}').style.width = '150px';
			 window.opener.document.getElementById('div{$v}').style.height = '100px';
		 }
		 else
			 window.opener.document.getElementById('div{$v}').style.backgroundImage = "url("+reimg+")";
	  }
		else if(window.opener.document.getElementById('{$v}')){
			window.opener.document.getElementById('{$v}').src = reimg;
		}
		if(document.all) window.opener=true;
	}
	
    window.close();
}
</SCRIPT>
    <table class="table table-condensed  table-bordered table-hover">
        <thead>
            <tr height="25" align="center">
                <td width="8%" align="center">预览</td>
                <td width="47%" align="center">点击名称选择图片</td>
                <td width="15%" align="center">文件大小</td>
                <td width="30%" align="center">最后修改时间</td>
            </tr>
            <tr>
              <td colspan='4' style="text-align:left;"> 点击"V"预览图片，点击图片名选择图片，显示图片后点击该图片关闭预览。 </td>
            </tr>
        </thead>
        <tbody>
            {$html}
        </tbody>
        <tfoot>
        	<tr>
            	<td colspan="4">
                <form action='{:U("SelectImagesPost")}' method='POST' enctype="multipart/form-data" name='myform'  role="form"  class="form-inline">
                    <input type='hidden' name='activepath' value='{$activepath}'>
                    <input type='hidden' name='f' value='{$f}'>
                    <input type='hidden' name='v' value='{$v}'>
                    <div class="form-group">
                    <input type='file' name='imgfile'/>
                    </div>
                    <!--<input type='checkbox' name='needwatermark' value='1' class='np' />
                    水印--> 
                    <!--<input type='checkbox' name='resize' value='1' class='np' />
                    缩小
                    宽：
                    <input type='text' style='width:30' name='iwidth' value='300' />
                    高：
                    <input type='text' style='width:30' name='iheight' value='200' />-->
                    <div class="form-group">
                    <input type='submit' name='sb1' class="btn btn-default" value='上传' />
                    </div>
                </form>
                </td>
            </tr>
        </tfoot>
    </table>
</body>
</html>